import java.util.Arrays;
import java.util.Random;
import java.util.Scanner;

public class T20250320 {
    public static void test1() {
        for (int i = 1; i <= 9; i++) {
            for (int j = 1; j <= i; j++) {
                System.out.print(j + "x" + i + "=" + String.format("%-3s", i * j));
            }
            System.out.println();
        }
//        System.out.println(String.format("name: %s, age: %d, salary: %.2f", "songyu", 18, 1000.233));
//        System.out.println(String.format("%-4s%-5s%4d", "金雷竹", "乾蓝冰焰", 72));
    }

    public static int compare_MaxNum(int a, int b) {
        return a > b ? a : b;
    }

    public static double compare_MaxNum(double a, double b, double c) {
        return (a > b ? a : b) > c ? (a > b ? a : b) : c;
    }

    public static void test2() {
        int[] arr1 = new int[]{1, 2, 3, 4, 5, 6, 7};//静态初始化
        String[] arr2 = new String[3];//动态初始化
        char[] arr3;
        char[] arr4;
        arr3 = new char[3];
        arr4 = new char[]{'慕', '沛', '灵'};
        float[] arr5 = new float[3];
        boolean[] arr6 = new boolean[3];
        for (int i = 0; i < arr1.length; i++) {
            if (i == arr1.length - 1) {
                System.out.print(arr1[i]);
                break;
            }
            System.out.print(arr1[i] + ", ");
        }
        System.out.println();
        for (int n : arr1) {
            System.out.print(n);
        }
        System.out.println();
        for (int i = 0; i < arr4.length; i++) {
            System.out.print(arr4[i]);
        }
        System.out.println();
        arr3[0] = '南';
        arr3[1] = '宫';
        arr3[2] = '婉';
        for (char n : arr3) {
            System.out.print(n);
        }
    }

public static void test3() {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int[] arr = new int[n];
    if(n <= 0) {
        String str = null;
        System.out.println(str);
    }
  arr[0] = arr[1] = 1;
    for (int i = 2; i < n; i++) {
        arr[i] = arr[i-1] + arr[i-2];
    }
    System.out.println(Arrays.toString(arr));
}

public static void test4() {
        int[] arr1 = new int[]{1,2,3,4,5};
        int[] arr2 = arr1;
        arr1[0] = 100;
        arr1[1] = 200;
    System.out.println("copy前:");
    System.out.println(Arrays.toString(arr1));
    System.out.println(Arrays.toString(arr2));
    arr2 = Arrays.copyOf(arr1, arr1.length);
    for (int i = 2; i < 5; i++) {
        arr2[i] = (2+1)*100;
    }
    System.out.println("copy后:");
    System.out.println(Arrays.toString(arr1));
    System.out.println(Arrays.toString(arr2));
    int[] arr3 = Arrays.copyOfRange(arr2, 0, 3);//[0,3)
    System.out.println("arr3: " + Arrays.toString(arr3));
}


public static void mppx(int[] arr) {
    for (int n = 0; n < arr.length - 1; n++) {
        int flag = 1;
        for (int j = 0; j < arr.length - 1 - n ; j++) {
            if (arr[j] > arr[j+1]) {
                flag = 0;
                int t = arr[j];
                arr[j] = arr[j+1];
                arr[j+1] = t;
            }
        }
        if (flag == 1) {
            break;
        }
    }
}


public static void test5() {
    Random random = new Random();
        int[] arr = new int[72];
    for (int i = 0; i < arr.length; i++) {
        arr[i] = 1 + random.nextInt(72);
    }
//    mppx(arr);
Arrays.sort(arr);
}

public static void test6() {
//        String[] arr = {"乾蓝冰焰", "辟邪神雷", "风雷翅"};
//        int[] arr1;
//        arr1 = new int[3];
//        boolean[] arr2;
//        arr2 = new boolean[3];
//    for (String s :arr) {
//        System.out.print(s + " ");
//    }
    int[][] arr = new int[][]{{1,2,3},{4,5,6},{7,8,9}};
    int[][] arrs = new int[2][];
    String[][] wood = new String[][]{{"金雷竹","养魂木","灵眼之木"}};
    arrs[0] = new int[3];
    arrs[1] = new int[5];
    for (int i = 0; i < wood.length; i++) {
        for (int j = 0; j < wood[i].length; j++) {
            System.out.print(wood[i][j] + " ");
        }
    }
}

public static void test7() {
//        FanRen f1 = new FanRen();
//        FanRen f2 = new FanRen();
//        FanRen f3 = new FanRen();
//        f1.name = "韩立";
//        f2.name = "银月";
//        f1.cultivation = "结丹后期";
//        f2.cultivation = "结丹初期";
//    System.out.println(String.format("姓名: %s, 修为: %s", f1.name, f1.cultivation));
//    System.out.println(String.format("姓名: %s, 修为: %s", f2.name, f2.cultivation));
//    f1.cfb();
//    f2.jj();
//    f3.cfb();
    Date d1 = new Date();
    Date d2 = new Date();
    Date d3 = new Date();
    d1.set_Date(2025, 3, 19);
    d2.set_Date(2025,3, 20);
    d1.print_Date();
    d2.print_Date();
    d3.print_Date();
}

public static int fact(int n) {
        if (n == 1 || n == 0) {
            return 1;
        }
        return n * fact(n - 1);
}

public static void asc_Print(int n) {
        if (n < 10) {
            System.out.print(n % 10 + " ");
            return;
        }
        asc_Print(n/10);
    System.out.print(n % 10 + " ");
}
public static void test8() {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        hnt(n, 'a', 'b', 'c');
//    System.out.println(String.format("fib(%d): %d", n, fib(n)));
//        asc_Print(n);
//    System.out.println(String.format("!%d: %d", n, fact(n)));
//    System.out.println(sum_Num(10));
}

public static void move(char p1, char p2) {
    System.out.print(p1 + "->" + p2 + " ");
}

public static void hnt(int n, char p1, char p2, char p3) {
        if (n == 1) {
            move(p1, p3);
            return;
        }
        hnt(n-1, p1, p3, p2);
        move(p1, p3);
        hnt(n - 1, p2, p1, p3);
}

    public static int fib(int n) {
        if (n == 1 || n == 2) {
            return 1;
        }
        return fib(n-1) + fib(n-2);
    }

public static int sum_Num(int n) {
        if (n == 1) {
            return 1;
        }
       return n + sum_Num(n - 1);
}

    public static void main(String[] args) {
//        test1();
//        compare_MaxNum(3,1,5);
//        compare_MaxNum(3, 5);
//        test2();
//        test3();
//        test4();
//        test5();
//        test6();
//        test7();
//        test8();
    }
}
